Removing imports from the IAT in metsrv - #810
Open
dledda-r7 wants to merge 2 commits into
Open
Conversation
Contributor
Author
neither copilot want to review my code :sadness: |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.
Suppressed comments (2)
c/meterpreter/source/metsrv/server_setup.c:388
- Important: Problem: this still calls
GetUserObjectInformationA/GetThreadDesktopdirectly rather than viamet_api->win_api.*like the rest of the PR. Impact: leaves user32 imports in the IAT and contradicts the stated goal of removing imports. Fix: route both calls throughmet_api->win_api.user32wrappers.
GetUserObjectInformationA(met_api->win_api.user32.GetProcessWindowStation(), UOI_NAME, &stationName, 256, NULL);
remote->orig_station_name = _strdup(stationName);
remote->curr_station_name = _strdup(stationName);
GetUserObjectInformationA(GetThreadDesktop(GetCurrentThreadId()), UOI_NAME, &desktopName, 256, NULL);
c/meterpreter/source/metsrv/winapi.c:219
- Suggestion: Problem: the forwarder-resolution comment claims support for ".#Ordinal" forwarders, but the implementation always re-hashes the substring after '.' and will not resolve ordinals. Impact: the comment is misleading and makes future maintenance/debugging harder. Fix: either implement ordinal parsing or adjust the comment to match current behavior.
// Forwarder detection: if the RVA falls inside the export directory,
// the "address" is actually a forwarder string of the form
// "TargetDll.TargetFunction" (or ".#Ordinal"). We must resolve it in
// the target DLL rather than returning the string as a function.
Contributor
Author
skills issues |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removing imports ✂️